package org.dromara.bean.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.bean.domain.HisGoods;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 商品spu视图对象 his_goods
 *
 * @author Lion Li
 * @date 2024-12-13
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HisGoods.class)
public class HisGoodsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 商品名称
     */
    @ExcelProperty(value = "商品名称")
    private String title;


    private String labels;

    /**
     * 售价
     */
    @ExcelProperty(value = "售价")
    private BigDecimal price;

    /**
     * 原价
     */
    @ExcelProperty(value = "原价")
    private BigDecimal originalPrice;

    /**
     * 详情图
     */
//    @ExcelProperty(value = "详情图")
    private String detailImage;

    /**
     * 详情图Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "detailImage")
    private String detailImageUrl;

    /**
     * 展示图
     */
//    @ExcelProperty(value = "展示图")
    private String photo;

    /**
     * 详情图Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "photo")
    private String photoUrl;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private String listing;


    /**
     * 销量
     */
    @ExcelProperty(value = "销量")
    private int sales;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;


    /**
     * 虚拟销量
     */
    private String virtuals;




    /**
     * 标签数组
     */
    @TableField(exist = false)
    private String[] label;


}
